from zyuekao.Page import Page
from selenium.webdriver.common.by import By

class Page1(Page):
    #切换页面
    def qiehuan(self):
        self.window()
    #点击写信页面
    xin_writer=(By.XPATH,'/html/body/div[1]/nav/div[1]/ul/li[2]')
    def writer_xin(self):
        self.click(self.xin_writer)
    #填写收件人
    shoujian_person=(By.CLASS_NAME,'nui-editableAddr-ipt')
    def person_shoujian(self):
        self.send_keys(self.shoujian_person,'lfc2314336117@163.com')

    #点击发送按钮
    fason_click=(By.CLASS_NAME,'nui-btn-text')
    def click_fason(self):
        self.click(self.fason_click)
    #确定不填写主题
    zhuti_messages=(By.XPATH,'//*[@id="_mail_button_151_1105"]')
    def messages_zhuti(self):
        self.click(self.zhuti_messages)

    #断言1
    dy1_dy=(By.XPATH,'//*[@id="_mail_link_162_1119"]')
    def dy_dy1(self):
        self.find_element(self.dy1_dy).text()
